home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Telephones.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  51.2 KB  |  1,355 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Telephones.h
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __TELEPHONES__
  18. #define __TELEPHONES__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __DIALOGS__
  25.     #include <Dialogs.h>
  26. #endif
  27.  
  28. #ifndef __MACERRORS__
  29.     #include <MacErrors.h>
  30. #endif
  31.  
  32. #ifndef __EVENTS__
  33.     #include <Events.h>
  34. #endif
  35.  
  36. #ifndef __CTBUTILITIES__
  37.     #include <CTBUtilities.h>
  38. #endif
  39.  
  40. #ifndef __COMPONENTS__
  41.     #include <Components.h>
  42. #endif
  43.  
  44.  
  45.  
  46.  
  47. #if PRAGMA_ONCE
  48. #pragma once
  49. #endif
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. #if PRAGMA_IMPORT
  56. #pragma import on
  57. #endif
  58.  
  59. #if PRAGMA_STRUCT_ALIGN
  60.     #pragma options align=mac68k
  61. #elif PRAGMA_STRUCT_PACKPUSH
  62.     #pragma pack(push, 2)
  63. #elif PRAGMA_STRUCT_PACK
  64.     #pragma pack(2)
  65. #endif
  66.  
  67. #if CALL_NOT_IN_CARBON
  68. enum {
  69.     curTELVersion                = 3,                            /* current Telephone Manager version */
  70.                                                                 /*    the chooseXXX symbols are defined in CTBUtilities.(pah) */
  71.     telChooseDisaster            = chooseDisaster,
  72.     telChooseFailed                = chooseFailed,
  73.     telChooseAborted            = chooseAborted,
  74.     telChooseOKMinor            = chooseOKMinor,
  75.     telChooseOKMajor            = chooseOKMajor,
  76.     telChooseCancel                = chooseCancel,
  77.     telChooseOKTermChanged        = 4
  78. };
  79.  
  80. #ifndef classTEL
  81. enum {
  82.                                                                 /* telephone tool file type */
  83.     classTEL                    = FOUR_CHAR_CODE('vbnd')
  84. };
  85.  
  86. #endif  /* !defined(classTEL) */
  87.  
  88. enum {
  89.                                                                 /* PHYSICAL TERMINAL CONSTANTS */
  90.                                                                 /* INDEPENDENT HANDSET CONSTANTS */
  91.     telIndHSOnHook                = 0,                            /* independent handset on hook */
  92.     telIndHSOffHook                = 1,                            /* independent handset off hook */
  93.     telIndHSDisconnected        = 0,                            /* handset disconnected from the line */
  94.     telIndHSConnected            = 1,                            /* handset connected to the line */
  95.                                                                 /* HOOK STATE CONSTANTS */
  96.     telHandset                    = 1,                            /* handset hookswitch */
  97.     telSpeakerphone                = 2,                            /* speakerphone 'on' switch */
  98.     telDeviceOffHook            = 1,                            /* device off hook */
  99.     telDeviceOnHook                = 0,                            /* device on hook */
  100.                                                                 /* VOLUME CONTROL CONSTANTS */
  101.     telHandsetSpeakerVol        = 1,                            /* volume of the handset speaker */
  102.     telHandsetMicVol            = 2,                            /* sensitivity of the handset mic */
  103.     telSpeakerphoneVol            = 3,                            /* speakerphone volume */
  104.     telSpeakerphoneMicVol        = 4,                            /* sensitivity of the spkrphone mic */
  105.     telRingerVol                = 5,                            /* volume of the ringer */
  106.     telBuiltinSPVol                = 6,                            /* volume of the built-in speakerphone */
  107.     telBuiltinSPMicVol            = 7,                            /* sensitivity of the built-in speakerphone mic */
  108.     telVolSame                    = 0,                            /* leaves the volume at previous level */
  109.     telVolMin                    = 1,                            /* turns volume down to minimum level, but not off */
  110.     telVolMax                    = 100,                            /* highest level allowed by the Telephone Manager */
  111.     telVolStateSame                = 0,                            /* leaves device in same state */
  112.     telVolStateOff                = 1,                            /* turns the device off , */
  113.                                                                 /* but doesn't change the volume setting. */
  114.                                                                 /* Use for mute functions. */
  115.     telVolStateOn                = 2,                            /* turns the device on.  Volume setting is */
  116.                                                                 /* the same as previously set.*/
  117.                                                                 /* DISPLAY CONSTANTS */
  118.     telNormalDisplayMode        = 1,                            /* normal display mode */
  119.     telInspectMode                = 2,                            /* inspect display mode */
  120.     telMiscMode                    = 3,                            /* miscellaneous display mode */
  121.     telRetrieveMode                = 4,                            /* message retrieval mode */
  122.     telDirectoryQueryMode        = 5,                            /* electronic directory mode */
  123.     telEntireDisplay            = 0,                            /* entire Display */
  124.                                                                 /* KEY PRESS CONSTANTS */
  125.     telHangupKey                = 1,                            /* drop, or release, key pressed */
  126.     telHoldKey                    = 2,                            /* hold key pressed */
  127.     telConferenceKey            = 3,                            /* conference key pressed */
  128.     telTransferKey                = 4,                            /* transfer key pressed */
  129.     telForwardKey                = 5,                            /* call forward key pressed */
  130.     telCallbackKey                = 6,                            /* call back key pressed */
  131.     telDNDKey                    = 7,                            /* do not disturb key pressed */
  132.     telCallPickupKey            = 8,                            /* call Pickup key pressed */
  133.     telCallParkKey                = 9,                            /* call Park key pressed */
  134.     telCallDeflectKey            = 10,                            /* call Deflect key pressed */
  135.     telVoiceMailAccessKey        = 11,                            /* voice Mail Access key pressed */
  136.     telCallRejectKey            = 12,                            /* call Reject key pressed */
  137.     telOtherKey                    = 16,                            /* other key pressed */
  138.     telKeyPadPress                = 1,                            /* key pressed on 12 digit keypad*/
  139.     telFeatureKeyPress            = 2,                            /* feature Key Pressed */
  140.     telTerminalEnabled            = 0,
  141.     telTerminalDisabled            = 1,
  142.     telUnknown                    = 0,                            /* unknown error */
  143.     telTerminalHWDisconnected    = 1,                            /* terminal hardware is disconnected */
  144.     telDeviceDriverClosed        = 2,                            /* device driver is closed */
  145.                                                                 /* ALERT PATTERN */
  146.     telPattern0                    = 0,
  147.     telPattern1                    = 1,
  148.     telPattern2                    = 2,
  149.     telPattern3                    = 3,
  150.     telPattern4                    = 4,
  151.     telPattern5                    = 5,
  152.     telPattern6                    = 6,
  153.     telPattern7                    = 7,
  154.     telPatternOff                = 8,
  155.     telPatternUndefined            = 15,                            /* DN TYPES */
  156.     telAllDNs                    = 0,                            /* counts all types of DNs */
  157.     telInternalDNs                = 1,                            /* connected to PBX or other non-public switch */
  158.     telInternalDNsOnly            = 2,                            /* connected to PBX or other non-public switch */
  159.                                                                 /* and able to place internal calls only */
  160.     telExternalDNs                = 3,                            /* connected to public network */
  161.     telDNTypeUnknown            = 4,                            /* DN type unknown */
  162.                                                                 /* DN USAGE */
  163.     telDNNotUsed                = 0,                            /* DN is not used - onhook */
  164.     telDNPOTSCall                = 1,                            /* DN used for POTs call */
  165.     telDNFaxCall                = 2,                            /* DN used for fax call */
  166.     telDNDataCall                = 3,                            /* DN used for data call */
  167.     telDNAlerting                = 4,                            /* Incoming call at DN */
  168.     telDNUnknownState            = 5,                            /* DN is in unknown state */
  169.                                                                 /* CALL FORWARDING TYPES */
  170.     telForwardImmediate            = 1,                            /* immediately forward calls */
  171.     telForwardBusy                = 2,                            /* forward on Busy */
  172.     telForwardNoAnswer            = 3,                            /* forward on No answer */
  173.     telForwardBusyNA            = 4,                            /* forwarding for busy and no answer*/
  174.     telForwardTypeUnknown        = 5,                            /* type of forwarding is unknown */
  175.                                                                 /* CALL FORWARDING MESSAGES */
  176.     telForwardCleared            = 0,                            /* forwarding has been cleared */
  177.     telForwardEst                = 1,                            /* forwarding has been established*/
  178.     telForwardFailed            = 2,                            /* attempt to setup forwarding has failed*/
  179.                                                                 /* DO NOT DISTURB TYPES */
  180.     telDNDIntExt                = 0,                            /* do not disturb for all internal and external calls*/
  181.     telDNDExternal                = 1,                            /* do not disturb for external calls only */
  182.     telDNDInternal                = 2,                            /* do not disturb for internal calls only */
  183.     telDNDNonIntercom            = 3,                            /* do not disturb for all calls except intercom */
  184.                                                                 /* DO NOT DISTURB MESSAGES */
  185.     telDNDCleared                = 0,                            /* do not disturb has been cleared */
  186.     telDNDEst                    = 1,                            /* do not disturb has been established */
  187.     telDNDFailed                = 2,                            /* attempt to setup do not disturb has failed */
  188.                                                                 /* VOICE MAIL MESSAGES */
  189.     telAllVoiceMessagesRead        = 0,                            /* all messages have been read, none are  waiting */
  190.                                                                 /* to be read */
  191.     telNewVoiceMessage            = 1,                            /* a new message has arrived or messages are waiting */
  192.                                                                 /* for this DN */
  193.                                                                 /* DNSELECT MESSAGE */
  194.     telDNDeselected                = 0,                            /* DN has been deselected */
  195.     telDNSelected                = 1,                            /* DN has been selected */
  196.                                                                 /* CALL ORIGINATORS */
  197.     telInternalCall                = 0,                            /* return nth internal CA */
  198.     telExternalCall                = 1,                            /* return nth external CA */
  199.     telUnknownCallOrigin        = 2,                            /* unknown call type */
  200.     telAllCallOrigins            = 2,                            /* return nth CA internal or external */
  201.                                                                 /* CALL TYPES */
  202.     telVoiceMailAccessOut        = (-7),
  203.     telPageOut                    = (-6),
  204.     telIntercomOut                = (-5),
  205.     telCallbackOut                = (-4),
  206.     telPickup                    = (-3),
  207.     telParkRetrieve                = (-2),
  208.     telNormalOut                = (-1),
  209.     telUnknownCallType            = 0,
  210.     telNormalIn                    = 1,
  211.     telForwardedImmediate        = 2,
  212.     telForwardedBusy            = 3,
  213.     telForwardedNoAnswer        = 4,
  214.     telTransfer                    = 5,
  215.     telDeflected                = 6,
  216.     telIntercepted                = 7,
  217.     telDeflectRecall            = 8,
  218.     telParkRecall                = 9,
  219.     telTransferredRecall        = 10,
  220.     telIntercomIn                = 11,
  221.     telCallbackIn                = 12,                            /* DIAL TYPES */
  222.     telDNDialable                = 0,                            /* this DN could be dialed via TELSetupCall */
  223.     telDNNorthAmerican            = 1,                            /* rmtDN is standard North America 10 digit number */
  224.     telDNInternational            = 2,                            /* rmtDN is an international number */
  225.     telDNAlmostDialable            = 3,                            /* rmtDN is almost dialable, */
  226.                                                                 /* missing prefix such as 9 or 1 */
  227.     telDNUnknown                = 15,                            /* unknown whether DN is dialable */
  228.                                                                 /* CALL PROGRESS MESSAGES */
  229.     telCAPDialTone                = 1,                            /* dial tone */
  230.     telCAPRinging                = 2,                            /* destination CA is alerting */
  231.     telCAPDialing                = 3,                            /* dialing the other end */
  232.     telCAPReorder                = 4,                            /* reorder */
  233.     telCAPBusy                    = 5,                            /* busy */
  234.     telCAPRouted                = 6,                            /* call routed; rmtDN will hold the routing directory */
  235.                                                                 /* number routeDN and routePartyName have been updated */
  236.     telCAPRoutedOff                = 7,                            /* call routed off-network; no further progress will */
  237.                                                                 /* be available */
  238.     telCAPTimeout                = 8,                            /* call timed out */
  239.     telCAPUpdate                = 9,                            /* name and rmtDN information has been updated */
  240.     telCAPPrompt                = 10,                            /* the network is prompting for more information */
  241.     telCAPWaiting                = 11,                            /* call is proceeding, but there is no response yet */
  242.                                                                 /* from the destination */
  243.     telCAPCPC                    = 12,                            /* telephone tool detected CPC signal */
  244.     telCAPNoDialTone            = 13,                            /* dial tone not detected */
  245.     telCAPUnknown                = 15,                            /* call progress state unknown */
  246.     telCAPDialDisabled            = 16,                            /* Blacklisting: Dial Disabled */
  247.     telCAPBlacklistedNumber        = 17,                            /* Blacklisting: Blacklisted Number */
  248.     telCAPForbiddenNumber        = 18,                            /* Blacklisting: Forbidden Number */
  249.     telCAPModemGuardTime        = 19,                            /* Modem Guard Timein force, unable to dial */
  250.     telCAPLCDetected            = 20,                            /* trying to dial a number while the handset is offhook */
  251.     telCAPLostLC                = 21,                            /* trying manual dial or answer while handset not off hook */
  252.                                                                 /* or also lost line current during dialing. */
  253.                                                                 /* OUTGOING CALL MESSAGES */
  254.     telPhysical                    = 0,                            /* user lifted handset and initiated call */
  255.     telProgrammatic                = 1,                            /* programmatic initiation of outgoing call */
  256.                                                                 /* DISCONNECT MESSAGES */
  257.     telLocalDisconnect            = 0,                            /* local party, this user, responsible for disconnect */
  258.     telRemoteDisconnect            = 1,                            /* remote party responsible for disconnect */
  259.                                                                 /* DISCONNECT TYPES */
  260.     telCADNormal                = 1,                            /* normal disconnect */
  261.     telCADBusy                    = 2,                            /* remote user busy */
  262.     telCADNoResponse            = 3,                            /* remote not responding */
  263.     telCADRejected                = 4,                            /* call rejected */
  264.     telCADNumberChanged            = 5,                            /* number changed */
  265.     telCADInvalidDest            = 6,                            /* invalid destination address */
  266.     telCADFacilityRejected        = 7,                            /* requested facility rejected */
  267.     telCADUnobtainableDest        = 9,                            /* destination not obtainable */
  268.     telCADCongested                = 10,                            /* network congestion */
  269.     telCADIncompatibleDest        = 11,                            /* incompatible destination */
  270.     telCADTimeout                = 12,                            /* call timed out */
  271.     telCADUnknown                = 15,                            /* reason unknown */
  272.                                                                 /* CONFERENCE MESSAGES */
  273.     telConferencePrepFailed        = 0,                            /* conference could not be prepared */
  274.     telConferencePending        = 1,                            /* conference prepared successfully */
  275.     telConferenceEstFailed        = 2,                            /* conference could not be established */
  276.     telConferenceEst            = 3,                            /* conference established */
  277.                                                                 /* TRANSFER MESSAGES */
  278.     telTransferPrepFailed        = 0,                            /* transfer could not be prepared */
  279.     telTransferPending            = 1,                            /* transfer prepared successfully */
  280.     telTransferEst                = 2,                            /* consult or blind xfer successful */
  281.     telTransferFailed            = 3,                            /* consult or blind xfer failed */
  282.     telTransferred                = 4,                            /* message to originator of CA specifying */
  283.                                                                 /* that call was transferred to rmtDN */
  284.                                                                 /* HOLD MESSAGES */
  285.     telHoldCleared                = 0,
  286.     telHoldEst                    = 1,
  287.     telHoldFailed                = 2,                            /* RECEIVE DIGIT MESSAGES */
  288.     telDigitAudible                = 0,
  289.     telDigitNotAudible            = 1,                            /* CALL PARK MESSAGES */
  290.     telCallParkEst                = 1,                            /* call has been successfully parked */
  291.     telCallParkRetrieveEst        = 2,                            /* parked Call has been successfully retrieved */
  292.     telCallParkFailed            = 3,                            /* attempt to setup call park has failed */
  293.     telCallParkRetrieveFailed    = 4,                            /* attempt to retrieve parked call failed */
  294.     telCallParkRecall            = 5,                            /* call park has been recalled */
  295.                                                                 /* CALL BACK MESSAGES */
  296.     telCallbackCleared            = 0,                            /* call back has been cleared */
  297.     telCallbackEst                = 1,                            /* call back has been established */
  298.     telCallbackNowAvail            = 2,                            /* call can be called back with TELCallBackNow */
  299.                                                                 /* if CA is zero, else call IS calling back on CA */
  300.     telCallbackFailed            = 3,                            /* attempt to setup callback has failed */
  301.     telCallbackDesired            = 4,                            /* a user has called this terminal, received no */
  302.                                                                 /* answer and desires this terminal to call it */
  303.                                                                 /* back */
  304.     telCallbackDesiredCleared    = 5,                            /* call back for no answer no longer desired */
  305.     telCalledback                = 6,                            /* callback has occurred successfully */
  306.                                                                 /* CALL REJECT MESSAGES */
  307.     telCallRejectFailed            = 0,                            /* attempt to reject call has failed */
  308.     telCallRejectEst            = 1,                            /* call successfully rejected */
  309.     telCallRejected                = 2,                            /* message to originator that call was rejected */
  310.                                                                 /* CALL DEFLECT MESSAGES */
  311.     telCallDeflectFailed        = 0,                            /* attempt to deflect call has failed */
  312.     telCallDeflectEst            = 1,                            /* call successfully deflected */
  313.     telCallDeflectRecall        = 2,                            /* deflected call has been recalled */
  314.     telCallDeflected            = 3,                            /* message to originator that call was deflected */
  315.                                                                 /* to rmtDN */
  316.     telAutoDeflectImmediate        = 4,                            /* a call was automatically deflected from this */
  317.                                                                 /* terminal as a result of immediate call */
  318.                                                                 /* forwarding */
  319.     telAutoDeflectBusy            = 5,                            /* a call was automatically deflected from this */
  320.                                                                 /* terminal as a result of call forwarding on busy */
  321.     telAutoDeflectNoAnswer        = 6,                            /* a call was automatically deflected from this */
  322.                                                                 /* terminal as a result of call forwarding on */
  323.                                                                 /* no answer */
  324.                                                                 /* CONFERENCE SPLIT MESSAGES */
  325.     telConferenceSplitFailed    = 0,                            /* CA could not be split */
  326.     telConferenceSplitEst        = 1,                            /* CA split successfully */
  327.                                                                 /* CONFERENCE DROP MESSAGES */
  328.     telConferenceDropFailed        = 0,                            /* CA could not be dropped */
  329.     telConferenceDropped        = 1,                            /* CA dropped successfully */
  330.                                                                 /* CALL PICKUP MESSAGES */
  331.     telCallPickupEst            = 0,                            /* call pickup was successful */
  332.     telCallPickupFailed            = 1,                            /* call pickup failed */
  333.     telCallPickedUp                = 2,                            /* message to originator that call was picked */
  334.                                                                 /* up at a different DN */
  335.                                                                 /* PAGING MESSAGES */
  336.     telPageEst                    = 0,                            /* paging was successful */
  337.     telPageComplete                = 1,                            /* paging activity completed */
  338.     telPageFailed                = 2,                            /* paging failed */
  339.                                                                 /* INTERCOM MESSAGES */
  340.     telIntercomEst                = 0,                            /* intercom was successful */
  341.     telIntercomComplete            = 1,                            /* intercom activity completed */
  342.     telIntercomFailed            = 2,                            /* intercom failed */
  343.                                                                 /* MODEM TONE MESSAGES */
  344.     telModemToneDetected        = 0,                            /* modem tone was detected */
  345.     telModemToneCleared            = 1,                            /* modem tone went away */
  346.                                                                 /* FAX TONE MESSAGES */
  347.     telFaxToneDetected            = 0,                            /* fax tone was detected */
  348.     telFaxToneCleared            = 1,                            /* fax tone went away */
  349.                                                                 /* IN USE MESSAGES */
  350.     telInUsePrivate                = 0,                            /* MADN is in use and can't be accessed */
  351.     telInUseCanAccess            = 1,                            /* MADN is in use, and others can access it */
  352.                                                                 /* and join in */
  353.     telInUseCanMakePrivate        = 2,                            /* MADN is in use, but available for any one */
  354.                                                                 /* person to access */
  355.     telInUseCleared                = 3,                            /* MADN is no longer in use */
  356.                                                                 /* CALL APPEARANCE STATES */
  357.     telCAIdleState                = 0,                            /* a call doesn't exist at this time */
  358.     telCAInUseState                = 1,                            /* the call is active but at another terminal */
  359.     telCAOfferState                = 2,                            /* a call is being offered to the terminal */
  360.     telCAQueuedState            = 3,                            /* a call is being queued at this terminal */
  361.     telCAAlertingState            = 4,                            /* a call is alerting at the terminal */
  362.     telCADialToneState            = 5,                            /* initiated outgoing call has dialtone */
  363.     telCADialingState            = 6,                            /* initiated outgoing call is dialing */
  364.     telCAWaitingState            = 7,                            /* initiated outgoing call is waiting for */
  365.                                                                 /* response from destination */
  366.     telCARingingState            = 8,                            /* the outgoing call is ringing. */
  367.     telCABusyState                = 9,                            /* destination is busy or can't be reached */
  368.     telCAHeldState                = 10,                            /* call has been put on hold by this terminal */
  369.     telCAConferencedState        = 11,                            /* this CA is part of a conference now */
  370.     telCAActiveState            = 12,                            /* the call is active and parties are free */
  371.                                                                 /* to exchange data */
  372.     telCAReorderState            = 13,                            /* CA is in a reorder state */
  373.     telCAConferencedHeldState    = 14,                            /* CA is a conference call in a held state */
  374.     telCAUnknownState            = 15,                            /* the call state is unknown */
  375.                                                                 /* TERMINAL MESSAGE EVENTMASKS */
  376.     telTermHookMsg                = 0x00000001,                    /* the hookswitch state has changed */
  377.     telTermKeyMsg                = 0x00000002,                    /* a phone pad key has been depressed */
  378.     telTermVolMsg                = 0x00000004,                    /* volume setting has changed */
  379.     telTermDisplayMsg            = 0x00000008,                    /* display has changed */
  380.     telTermEnableMsg            = 0x00000010,                    /* terminal has become enabled */
  381.     telTermOpenMsg                = 0x00000020,                    /* terminal has been opened */
  382.     telTermCloseMsg                = 0x00000040,                    /* terminal is shutting down */
  383.     telTermResetMsg                = 0x00000080,                    /* terminal has been reset */
  384.     telTermErrorMsg                = 0x00000100,                    /* hard equipment error */
  385.     telTermIndHSStateChgMsg        = 0x00000200,                    /* change in handset state from inacive to */
  386.                                                                 /* active or vice versa */
  387.     telTermIndHSConnectMsg        = 0x00000400,                    /* independent handset connection has been changed */
  388.     telTermKeyImmMsg            = 0x00000800,                    /* immidiate arrival of phone pad key */
  389.     telTermVolStateMsg            = 0x00001000,                    /* volume state has changed */
  390.     telTermOtherMsg                = (long)0x80000000,                /* vendor defined error */
  391.     telAllTermMsgs                = 0x00001FFF,                    /* mask to all non tool specific terminal events */
  392.                                                                 /* DN MESSAGE EVENTMASK CONSTANTS */
  393.     telDNForwardMsg                = 0x00000001,                    /* forward feature activity */
  394.     telDNDNDMsg                    = 0x00000002,                    /* do not disturb feature activity */
  395.     telDNVoiceMailMsg            = 0x00000004,                    /* message has arrived for this DN */
  396.     telDNSelectedMsg            = 0x00000008,                    /* DN has been selected or deselected */
  397.     telDNOtherMsg                = (long)0x80000000,                /* a custom message for use by tools */
  398.     telAllDNMsgs                = 0x0000000F,                    /* mask to all non tool specific dn events */
  399.                                                                 /* CA MESSAGE EVENTMASK CONSTANTS */
  400.     telCAAlertingMsg            = 0x00000001,                    /* CA is alerting  */
  401.     telCAOfferMsg                = 0x00000002,                    /* CA is being offered a call */
  402.     telCAProgressMsg            = 0x00000004,                    /* call progress info for this CA */
  403.     telCAOutgoingMsg            = 0x00000008,                    /* CA is initiating an outgoing call */
  404.     telCADisconnectMsg            = 0x00000010,                    /* CA disconnected (dropped or rmt disc */
  405.     telCAActiveMsg                = 0x00000020,                    /* CA is active and voice/data is free */
  406.                                                                 /* to flow end to end */
  407.     telCAConferenceMsg            = 0x00000040,                    /* conference activity on CA */
  408.     telCATransferMsg            = 0x00000080,                    /* transfer feature activity */
  409.     telCAHoldMsg                = 0x00000100,                    /* hold feature activity */
  410.     telCADigitsMsg                = 0x00000200,                    /* remote signaling digits arrived */
  411.     telCACallParkMsg            = 0x00000400,                    /* CA call park feature activity */
  412.     telCACallbackMsg            = 0x00000800,                    /* CA call back feature activity  */
  413.     telCARejectMsg                = 0x00001000,                    /* CA is rejected */
  414.     telCADeflectMsg                = 0x00002000,                    /* CA is deflected */
  415.     telCAForwardMsg                = 0x00004000,                    /* CA is forwarded to this DN  */
  416.     telCAConferenceSplitMsg        = 0x00008000,                    /* conference split activity  */
  417.     telCAConferenceDropMsg        = 0x00010000,                    /* conference drop activity  */
  418.     telCAQueuedMsg                = 0x00020000,                    /* CA has been queued  */
  419.     telCAInUseMsg                = 0x00040000,                    /* CA is in use  */
  420.     telCACallPickupMsg            = 0x00080000,                    /* CA pickup activity */
  421.     telCAPagingMsg                = 0x00100000,                    /* CA paging activity */
  422.     telCAIntercomMsg            = 0x00200000,                    /* CA intercom activity */
  423.     telCAModemToneMsg            = 0x00400000,                    /* modem tones detected */
  424.     telCAFaxToneMsg                = 0x00800000,                    /* fax tones detected */
  425.     telCAIdleMsg                = 0x01000000,                    /* CA is in idle state */
  426.     telCASuccessiveAlertMsg        = 0x02000000,                    /* phone is alerting, one per ring */
  427.     telCAUserUserInfoMsg        = 0x04000000,                    /* user to user information has arrrived */
  428.                                                                 /* for this CA */
  429.     telCAHandOffMsg                = 0x08000000,                    /* CA is ready for hand-off */
  430.     telCAVoiceDetectedMsg        = 0x10000000,                    /* voice Detect related event */
  431.     telCASilenceDetectedMsg        = 0x20000000,                    /* silence Detect related event */
  432.     telCADigitsImmMsg            = 0x40000000,                    /* immidiate arrival of remote signaling digits */
  433.     telCAOtherMsg                = (long)0x80000000,                /* tool specific CA message */
  434.     telAllCAMsgs                = 0x7FFFFFFF                    /* mask to all non tool specific CA events */
  435. };
  436.  
  437. typedef OSErr                             TELErr;
  438. typedef unsigned long                     TELFlags;
  439. enum {
  440.     telNoMenus                    = 1L << 16,                        /* tells tool not to display any custom menus */
  441.     telQuiet                    = 1L << 17,                        /* tells tool not to display any dialog boxes or alerts */
  442.     telConfigChanged            = 1L << 18                        /* notifies application that the config has changed */
  443. };
  444.  
  445. typedef unsigned long                     TELFeatureFlags;
  446. enum {
  447.     pcmAvail                    = 1L << 0,                        /* true if PCM voice data accessible */
  448.     hasHandset                    = 1L << 1,                        /* true if a phone handset is attached  */
  449.     hasSpeakerphone                = 1L << 2,                        /* true if a 2 way speakerphone is attached */
  450.     canOnHookDial                = 1L << 3,                        /* can on-hook dial */
  451.     hasRinger                    = 1L << 4,                        /* terminal has its own ringer */
  452.     canSetDisplay                = 1L << 5,                        /* application can write to the display */
  453.     hasKeypad                    = 1L << 6,                        /* attached phone has standard 12 key pad */
  454.     hasVideo                    = 1L << 7,                        /* terminal has a videophone */
  455.     hasOther                    = 1L << 8,                        /* reserved for future use */
  456.     crossDNConference            = 1L << 9,                        /* can perform cross-DN conferences */
  457.     hasSubaddress                = 1L << 10,                        /* attached network supports subaddressing */
  458.     hasUserUserInfo                = 1L << 11,                        /* network supports user-to-user info */
  459.     hasHandsetSoundStreams        = 1L << 12,                        /* sound streams are supported on the handset */
  460.     hasIndHandset                = 1L << 13,                        /* handset can be accessed independently of the phone line */
  461.     hasBuiltinSpeakerphone        = 1L << 14                        /* speaker and microphone of the Mac can be used */
  462. };
  463.  
  464.  
  465.  
  466. struct TELTermRecord {
  467.  
  468.     short                             tRef;
  469.     TELFeatureFlags                 featureFlags;
  470.     short                             handsetSpeakerVol;
  471.     short                             handsetMicVol;
  472.     short                             speakerphoneVol;
  473.     short                             speakerphoneMicVol;
  474.     short                             ringerVol;
  475.     short                             otherVol;
  476.     short                             ringerTypes;
  477.     short                             hasDisplay;
  478.     short                             displayRows;
  479.     short                             numDNs;
  480.     short                             maxAllocCA;
  481.     short                             curAllocCA;
  482.     short                             builtinSpeakerVol;
  483.     short                             builtinSpeakerMicVol;
  484.     long                             reserved;
  485. };
  486. typedef struct TELTermRecord            TELTermRecord;
  487.  
  488. typedef TELTermRecord *                    TELTermPtr;
  489.  
  490. struct TELRecord {
  491.     short                             procID;
  492.  
  493.     TELFlags                         flags;
  494.     short                             reserved;
  495.  
  496.     long                             refCon;
  497.     long                             userData;
  498.  
  499.     UniversalProcPtr                 defproc;
  500.  
  501.     Ptr                             config;
  502.     Ptr                             oldConfig;
  503.  
  504.     TELTermPtr                         pTELTerm;
  505.  
  506.     long                             telPrivate;
  507.     long                             reserved1;
  508.     long                             reserved2;
  509.  
  510.     long                             pTELTermSize;
  511.     short                             version;
  512.  
  513. };
  514. typedef struct TELRecord                TELRecord;
  515.  
  516. typedef TELRecord *                        TELPtr;
  517. typedef TELPtr *                        TELHandle;
  518. typedef unsigned long                     TELDNFeatureFlags;
  519. enum {
  520.     dndSub                        = 1L << 0,                        /* do not disturb subscribed */
  521.     dndAvail                    = 1L << 1,                        /* do not disturb available */
  522.     dndActive                    = 1L << 2,                        /* do not disturb active */
  523.     voiceMailAccessSub            = 1L << 3,                        /* message waiting subscribed */
  524.     voiceMailAccessAvail        = 1L << 4,                        /* message waiting available */
  525.     voiceMailAccessActive        = 1L << 5,                        /* message waiting active */
  526.     pagingSub                    = 1L << 6,                        /* paging is subscribed */
  527.     pagingAvail                    = 1L << 7,                        /* paging is available */
  528.     pagingActive                = 1L << 8,                        /* paging is active */
  529.     intercomSub                    = 1L << 9,                        /* intercom is subscribed */
  530.     intercomAvail                = 1L << 10,                        /* intercom is available */
  531.     intercomActive                = 1L << 11,                        /* intercom is active */
  532.     dnSelectSub                    = 1L << 12,                        /* DN select is subscribed */
  533.     dnSelectAvail                = 1L << 13,                        /* DN select is available */
  534.     dnSelectActive                = 1L << 14,                        /* DN is selected */
  535.     callPickupSub                = 1L << 15,                        /* call pickup is subscribed */
  536.     callPickupAvail                = 1L << 16,                        /* call pickup is available */
  537.     dnInUse                        = 1L << 17,                        /* a CA is allocated for this DN */
  538.     logicalDN                    = 1L << 18,                        /* this DN is not on this terminal */
  539.     dnAccessible                = 1L << 19,                        /* commands can be sent to this DN */
  540.     canInitiate                    = 1L << 20,                        /* an outgoing CA can be initiated */
  541.     voiceMessageWaiting            = 1L << 21,                        /* voice mail waiting for this dn */
  542.     hasDNSoundStreams            = 1L << 22,                        /* sound streams are supported on this DN */
  543.     autoAnswerAvail                = 1L << 23,                        /* AutoAnswer is set for this DN */
  544.     autoAnswerActive            = 1L << 24,                        /* AutoAnswer is currently applied to CA on this DN */
  545.     tollSaverAvail                = 1L << 25,                        /* tollSaver is set for this DN */
  546.     tollSaverActive                = 1L << 26                        /* tollSaver is currently applied to CA on this DN */
  547. };
  548.  
  549. typedef unsigned long                     TELDNForwardFlags;
  550. enum {
  551.     immediateForwardSub            = 1L << 0,                        /* immediate call forward subscribed */
  552.     immediateForwardAvail        = 1L << 1,                        /* immediate call forward available */
  553.     immediateForwardActive        = 1L << 2,                        /* immediate call forward active */
  554.     busyForwardSub                = 1L << 3,                        /* forward on busy subscribed */
  555.     busyForwardAvail            = 1L << 4,                        /* forward on busy available */
  556.     busyForwardActive            = 1L << 5,                        /* forward on busy active */
  557.     noAnswerForwardSub            = 1L << 6,                        /* no answer call forward subscribed */
  558.     noAnswerForwardAvail        = 1L << 7,                        /* no answer call forward available */
  559.     noAnswerForwardActive        = 1L << 8,                        /* no answer call forward active */
  560.     busyNAForwardSub            = 1L << 9,                        /* busy & no answer call forward subscribed */
  561.     busyNAForwardAvail            = 1L << 10,                        /* busy & no answer call forward available */
  562.     busyNAForwardActive            = 1L << 11                        /* busy & no answer call forward active */
  563. };
  564.  
  565.  
  566.  
  567. struct TELDNRecord {
  568.  
  569.     short                             dnRef;
  570.     StringPtr                         dn;
  571.     StringPtr                         dnPartyName;
  572.     StringPtr                         dnSubaddress;
  573.     TELHandle                         hTEL;
  574.     short                             maxAllocCA;
  575.     short                             curAllocCA;
  576.     short                             dnType;
  577.     TELDNFeatureFlags                 featureFlags;
  578.     short                             numPageIDs;
  579.     short                             numIntercomIDs;
  580.     short                             numPickupIDs;
  581.     TELDNForwardFlags                 forwardFlags;
  582.     StringPtr                         iForwardDN;
  583.     StringPtr                         iForwardSubaddress;
  584.     StringPtr                         iForwardPartyName;
  585.     StringPtr                         bForwardDN;
  586.     StringPtr                         bForwardSubaddress;
  587.     StringPtr                         bForwardPartyName;
  588.     StringPtr                         naForwardDN;
  589.     StringPtr                         naForwardSubaddress;
  590.     StringPtr                         naForwardPartyName;
  591.     short                             naForwardRings;
  592.     long                             telDNPrivate;
  593.     long                             refCon;
  594.     long                             userData;
  595.     long                             reserved;
  596. };
  597. typedef struct TELDNRecord                TELDNRecord;
  598.  
  599. typedef TELDNRecord *                    TELDNPtr;
  600. typedef TELDNPtr *                        TELDNHandle;
  601. typedef unsigned long                     TELCAFeatureFlags;
  602. enum {
  603.     holdSub                        = 1L << 0,                        /* hold subscribed  */
  604.     holdAvail                    = 1L << 1,                        /* hold available  */
  605.     holdActive                    = 1L << 2,                        /* hold active  */
  606.     conferenceSub                = 1L << 3,                        /* conference subscribed */
  607.     conferenceAvail                = 1L << 4,                        /* conference available */
  608.     conferenceActive            = 1L << 5,                        /* conference active  */
  609.     conferenceDropSub            = 1L << 6,                        /* conference drop subscribed  */
  610.     conferenceDropAvail            = 1L << 7,                        /* a call to TELDrop will drop this */
  611.                                                                 /* CA only from a conference */
  612.     conferenceSplitSub            = 1L << 8,                        /* conference split subscribed  */
  613.     conferenceSplitAvail        = 1L << 9,                        /* conference split available for this CA */
  614.     numToConferenceRequired        = 1L << 10,                        /* the number of CAs to be conferenced is */
  615.                                                                 /* required in TELConfPrep  */
  616.     transferSub                    = 1L << 11,                        /* transfer subscribed  */
  617.     transferAvail                = 1L << 12,                        /* transfer available  */
  618.     transferActive                = 1L << 13,                        /* transfer active */
  619.     caRelated                    = 1L << 14                        /* this CA is the specified in some other CA's relatedCA field*/
  620. };
  621.  
  622. typedef unsigned long                     TELCAOtherFeatures;
  623. enum {
  624.     callbackSub                    = 1L << 0,                        /* call back subscribed */
  625.     callbackAvail                = 1L << 1,                        /* call back available */
  626.     callbackActive                = 1L << 2,                        /* call back active  */
  627.     callbackClearSub            = 1L << 3,                        /* call back clearing subscribed */
  628.     callbackNowSub                = 1L << 4,                        /* call back now subscribed */
  629.     callbackNowAvail            = 1L << 5,                        /* call back now available  */
  630.     callbackBusy                = 1L << 6,                        /* call back on busy */
  631.     callbackNoAnswer            = 1L << 7,                        /* call back on no answer */
  632.     callbackReturnsRef            = 1L << 8,                        /* call back returns a reference */
  633.     parkSub                        = 1L << 9,                        /* call park subscribed */
  634.     parkAvail                    = 1L << 10,                        /* call park available */
  635.     parkActive                    = 1L << 11,                        /* call park active */
  636.     parkRetrieveSub                = 1L << 12,                        /* call park retrieve subscribed */
  637.     parkRetrieveWithID            = 1L << 13,                        /* retrieve parked calls with IDs */
  638.     parkWithReturnedID            = 1L << 14,                        /* park call to a specific remote ID */
  639.     parkWithGivenID                = 1L << 18,                        /* for switch that requires ID for parking */
  640.     rejectable                    = 1L << 15,                        /* CA is rejectable  */
  641.     deflectable                    = 1L << 16,                        /* CA is deflectable  */
  642.     acceptable                    = 1L << 17,                        /* CA is acceptable */
  643.     voiceDetected                = 1L << 19,                        /* voice has been detected on this CA incase of */
  644.                                                                 /* an incoming call */
  645.     callAnswdTSRings            = 1L << 20                        /* incoimng call was answered on TollSaver rings */
  646. };
  647.  
  648. typedef struct TELCARecord                 TELCARecord;
  649. typedef TELCARecord *                    TELCAPtr;
  650. typedef TELCAPtr *                        TELCAHandle;
  651.  
  652. struct TELCARecord {
  653.     short                             caRef;
  654.     TELDNHandle                     hTELDN;
  655.     TELHandle                         hTEL;
  656.     short                             caState;
  657.     TELCAHandle                     relatedCA;
  658.     long                             connectTime;                /* can be used by application to keep track of connect time */
  659.     short                             intExt;
  660.     short                             callType;
  661.     short                             dialType;
  662.     short                             bearerType;
  663.     short                             rate;
  664.     StringPtr                         rmtDN;
  665.     StringPtr                         rmtPartyName;
  666.     StringPtr                         rmtSubaddress;
  667.     StringPtr                         routeDN;
  668.     StringPtr                         routePartyName;
  669.     StringPtr                         routeSubaddress;
  670.     short                             priority;
  671.     short                             conferenceLimit;
  672.     TELCAFeatureFlags                 featureFlags;
  673.     TELCAOtherFeatures                 otherFeatures;
  674.     long                             telCAPrivate;
  675.     long                             refCon;
  676.     long                             userData;
  677.     long                             reserved;
  678. };
  679.  
  680. /* Constants for HandleType in structure above */
  681. enum {
  682.     telHandleType                = 0,                            /* feature requires a terminal handle */
  683.     telDNHandleType                = 1,                            /* feature requires a DN handle */
  684.     telCAHandleType                = 2                                /* feature requires a CA handle */
  685. };
  686.  
  687.  
  688. struct FeatureList {
  689.     short                             featureID;
  690.     StringPtr                         featureName;
  691.     short                             handleType;
  692.     struct FeatureList *            nextFeature;
  693. };
  694. typedef struct FeatureList                FeatureList;
  695. typedef FeatureList *                    FeatureListPtr;
  696. /* CA MESSAGE STRUCTURES FOR MSGINFO */
  697.  
  698. struct CAGenericMsgRec {
  699.     StringPtr                         rmtDN;
  700.     StringPtr                         rmtName;
  701.     StringPtr                         rmtSubaddress;
  702.     short                             dialType;
  703. };
  704. typedef struct CAGenericMsgRec            CAGenericMsgRec;
  705.  
  706. struct CAUserUserInfoMsgRec {
  707.     StringPtr                         userUserInfo;
  708. };
  709. typedef struct CAUserUserInfoMsgRec        CAUserUserInfoMsgRec;
  710.  
  711. struct CAConfMsgRec {
  712.     TELCAHandle                     relatedCA;
  713. };
  714. typedef struct CAConfMsgRec                CAConfMsgRec;
  715.  
  716. struct CATransfMsgRec {
  717.     StringPtr                         rmtDN;
  718.     StringPtr                         rmtName;
  719.     StringPtr                         rmtSubaddress;
  720.     short                             dialType;
  721.     TELCAHandle                     prepCA;
  722. };
  723. typedef struct CATransfMsgRec            CATransfMsgRec;
  724. typedef CALLBACK_API( void , TelephoneTermMsgProcPtr )(TELHandle hTEL, long msg, short mtype, short value, long globals);
  725. typedef CALLBACK_API( void , TelephoneDNMsgProcPtr )(TELDNHandle hTELDN, long Msg, short mtype, short value, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress, long globals);
  726. typedef CALLBACK_API( void , TelephoneCAMsgProcPtr )(TELCAHandle hTELCA, long Msg, short mtype, short value, Ptr Msginfo, long globals);
  727. typedef CALLBACK_API( void , TelephoneChooseIdleProcPtr )(void );
  728. typedef STACK_UPP_TYPE(TelephoneTermMsgProcPtr)                 TelephoneTermMsgUPP;
  729. typedef STACK_UPP_TYPE(TelephoneDNMsgProcPtr)                     TelephoneDNMsgUPP;
  730. typedef STACK_UPP_TYPE(TelephoneCAMsgProcPtr)                     TelephoneCAMsgUPP;
  731. typedef STACK_UPP_TYPE(TelephoneChooseIdleProcPtr)                 TelephoneChooseIdleUPP;
  732. #if OPAQUE_UPP_TYPES
  733.     EXTERN_API(TelephoneTermMsgUPP)
  734.     NewTelephoneTermMsgUPP           (TelephoneTermMsgProcPtr    userRoutine);
  735.  
  736.     EXTERN_API(TelephoneDNMsgUPP)
  737.     NewTelephoneDNMsgUPP           (TelephoneDNMsgProcPtr    userRoutine);
  738.  
  739.     EXTERN_API(TelephoneCAMsgUPP)
  740.     NewTelephoneCAMsgUPP           (TelephoneCAMsgProcPtr    userRoutine);
  741.  
  742.     EXTERN_API(TelephoneChooseIdleUPP)
  743.     NewTelephoneChooseIdleUPP       (TelephoneChooseIdleProcPtr userRoutine);
  744.  
  745.     EXTERN_API(void)
  746.     DisposeTelephoneTermMsgUPP       (TelephoneTermMsgUPP        userUPP);
  747.  
  748.     EXTERN_API(void)
  749.     DisposeTelephoneDNMsgUPP       (TelephoneDNMsgUPP        userUPP);
  750.  
  751.     EXTERN_API(void)
  752.     DisposeTelephoneCAMsgUPP       (TelephoneCAMsgUPP        userUPP);
  753.  
  754.     EXTERN_API(void)
  755.     DisposeTelephoneChooseIdleUPP    (TelephoneChooseIdleUPP userUPP);
  756.  
  757.     EXTERN_API(void)
  758.     InvokeTelephoneTermMsgUPP       (TELHandle                hTEL,
  759.                                     long                    msg,
  760.                                     short                    mtype,
  761.                                     short                    value,
  762.                                     long                    globals,
  763.                                     TelephoneTermMsgUPP        userUPP);
  764.  
  765.     EXTERN_API(void)
  766.     InvokeTelephoneDNMsgUPP           (TELDNHandle                hTELDN,
  767.                                     long                    Msg,
  768.                                     short                    mtype,
  769.                                     short                    value,
  770.                                     ConstStr255Param        rmtDN,
  771.                                     ConstStr255Param        rmtName,
  772.                                     ConstStr255Param        rmtSubaddress,
  773.                                     long                    globals,
  774.                                     TelephoneDNMsgUPP        userUPP);
  775.  
  776.     EXTERN_API(void)
  777.     InvokeTelephoneCAMsgUPP           (TELCAHandle                hTELCA,
  778.                                     long                    Msg,
  779.                                     short                    mtype,
  780.                                     short                    value,
  781.                                     Ptr                        Msginfo,
  782.                                     long                    globals,
  783.                                     TelephoneCAMsgUPP        userUPP);
  784.  
  785.     EXTERN_API(void)
  786.     InvokeTelephoneChooseIdleUPP    (TelephoneChooseIdleUPP    userUPP);
  787.  
  788. #else
  789.     enum { uppTelephoneTermMsgProcInfo = 0x0000EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
  790.     enum { uppTelephoneDNMsgProcInfo = 0x003FEBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  791.     enum { uppTelephoneCAMsgProcInfo = 0x0003EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  792.     enum { uppTelephoneChooseIdleProcInfo = 0x00000000 };             /* pascal no_return_value Func() */
  793.     #define NewTelephoneTermMsgUPP(userRoutine)                     (TelephoneTermMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneTermMsgProcInfo, GetCurrentArchitecture())
  794.     #define NewTelephoneDNMsgUPP(userRoutine)                         (TelephoneDNMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneDNMsgProcInfo, GetCurrentArchitecture())
  795.     #define NewTelephoneCAMsgUPP(userRoutine)                         (TelephoneCAMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneCAMsgProcInfo, GetCurrentArchitecture())
  796.     #define NewTelephoneChooseIdleUPP(userRoutine)                     (TelephoneChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneChooseIdleProcInfo, GetCurrentArchitecture())
  797.     #define DisposeTelephoneTermMsgUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  798.     #define DisposeTelephoneDNMsgUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  799.     #define DisposeTelephoneCAMsgUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  800.     #define DisposeTelephoneChooseIdleUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  801.     #define InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userUPP)  CALL_FIVE_PARAMETER_UPP((userUPP), uppTelephoneTermMsgProcInfo, (hTEL), (msg), (mtype), (value), (globals))
  802.     #define InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userUPP)  CALL_EIGHT_PARAMETER_UPP((userUPP), uppTelephoneDNMsgProcInfo, (hTELDN), (Msg), (mtype), (value), (rmtDN), (rmtName), (rmtSubaddress), (globals))
  803.     #define InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userUPP)  CALL_SIX_PARAMETER_UPP((userUPP), uppTelephoneCAMsgProcInfo, (hTELCA), (Msg), (mtype), (value), (Msginfo), (globals))
  804.     #define InvokeTelephoneChooseIdleUPP(userUPP)                     CALL_ZERO_PARAMETER_UPP((userUPP), uppTelephoneChooseIdleProcInfo)
  805. #endif
  806. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  807. #define NewTelephoneTermMsgProc(userRoutine)                     NewTelephoneTermMsgUPP(userRoutine)
  808. #define NewTelephoneDNMsgProc(userRoutine)                         NewTelephoneDNMsgUPP(userRoutine)
  809. #define NewTelephoneCAMsgProc(userRoutine)                         NewTelephoneCAMsgUPP(userRoutine)
  810. #define NewTelephoneChooseIdleProc(userRoutine)                 NewTelephoneChooseIdleUPP(userRoutine)
  811. #define CallTelephoneTermMsgProc(userRoutine, hTEL, msg, mtype, value, globals) InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userRoutine)
  812. #define CallTelephoneDNMsgProc(userRoutine, hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals) InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userRoutine)
  813. #define CallTelephoneCAMsgProc(userRoutine, hTELCA, Msg, mtype, value, Msginfo, globals) InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userRoutine)
  814. #define CallTelephoneChooseIdleProc(userRoutine)                InvokeTelephoneChooseIdleUPP(userRoutine)
  815. #endif  /* CALL_NOT_IN_CARBON */
  816.  
  817. EXTERN_API( TELErr )
  818. InitTEL                            (void);
  819.  
  820. EXTERN_API( TELErr )
  821. TELGetInfo                        (TELHandle                 hTEL);
  822.  
  823. EXTERN_API( TELErr )
  824. TELOpenTerm                        (TELHandle                 hTEL);
  825.  
  826. EXTERN_API( TELErr )
  827. TELResetTerm                    (TELHandle                 hTEL);
  828.  
  829. EXTERN_API( TELErr )
  830. TELCloseTerm                    (TELHandle                 hTEL);
  831.  
  832. EXTERN_API( TELErr )
  833. TELTermMsgHand                    (TELHandle                 hTEL,
  834.                                  long                     eventMask,
  835.                                  TelephoneTermMsgUPP     msgProc,
  836.                                  long                     globals);
  837.  
  838. EXTERN_API( TELErr )
  839. TELClrTermMsgHand                (TELHandle                 hTEL,
  840.                                  TelephoneTermMsgUPP     msgProc);
  841.  
  842. EXTERN_API( TELErr )
  843. TELTermEventsSupp                (TELHandle                 hTEL,
  844.                                  long *                    eventMask);
  845.  
  846. EXTERN_API( short )
  847. TELGetProcID                    (Str255                 name);
  848.  
  849. EXTERN_API( TELHandle )
  850. TELNew                            (short                     procID,
  851.                                  TELFlags                 flags,
  852.                                  long                     refCon,
  853.                                  long                     userData);
  854.  
  855. EXTERN_API( TELHandle )
  856. TELNewWithResult                (short                     procID,
  857.                                  TELFlags                 flags,
  858.                                  long                     refCon,
  859.                                  long                     userData,
  860.                                  TELErr *                error);
  861.  
  862. EXTERN_API( TELErr )
  863. TELDefault                        (Ptr *                    theConfig,
  864.                                  short                     procID,
  865.                                  Boolean                 allocate);
  866.  
  867. EXTERN_API( Boolean )
  868. TELValidate                        (TELHandle                 hTEL);
  869.  
  870. EXTERN_API( Ptr )
  871. TELGetConfig                    (TELHandle                 hTEL);
  872.  
  873. EXTERN_API( short )
  874. TELSetConfig                    (TELHandle                 hTEL,
  875.                                  Ptr                     thePtr);
  876.  
  877. EXTERN_API( TELErr )
  878. TELChoose                        (TELHandle *            hTEL,
  879.                                  Point                     where,
  880.                                  TelephoneChooseIdleUPP  idleProc);
  881.  
  882. EXTERN_API( Handle )
  883. TELSetupPreflight                (short                     procID,
  884.                                  long *                    magicCookie);
  885.  
  886. EXTERN_API( void )
  887. TELSetupSetup                    (short                     procID,
  888.                                  Ptr                     theConfig,
  889.                                  short                     count,
  890.                                  DialogPtr                 theDialog,
  891.                                  long *                    magicCookie);
  892.  
  893. EXTERN_API( Boolean )
  894. TELSetupFilter                    (short                     procID,
  895.                                  Ptr                     theConfig,
  896.                                  short                     count,
  897.                                  DialogPtr                 theDialog,
  898.                                  EventRecord *            theEvent,
  899.                                  short *                theItem,
  900.                                  long *                    magicCookie);
  901.  
  902. EXTERN_API( void )
  903. TELSetupItem                    (short                     procID,
  904.                                  Ptr                     theConfig,
  905.                                  short                     count,
  906.                                  DialogPtr                 theDialog,
  907.                                  short *                theItem,
  908.                                  long *                    magicCookie);
  909.  
  910. EXTERN_API( void )
  911. TELSetupCleanup                    (short                     procID,
  912.                                  Ptr                     theConfig,
  913.                                  short                     count,
  914.                                  DialogPtr                 theDialog,
  915.                                  long *                    magicCookie);
  916.  
  917. EXTERN_API( void )
  918. TELSetupXCleanup                (short                     procID,
  919.                                  Ptr                     theConfig,
  920.                                  short                     count,
  921.                                  DialogPtr                 theDialog,
  922.                                  Boolean                 OKed,
  923.                                  long *                    magicCookie);
  924.  
  925. EXTERN_API( void )
  926. TELSetupPostflight                (short                     procID);
  927.  
  928. EXTERN_API( TELErr )
  929. TELDispose                        (TELHandle                 hTEL);
  930.  
  931. EXTERN_API( short )
  932. TELCountDNs                        (TELHandle                 hTEL,
  933.                                  short                     dnType,
  934.                                  Boolean                 physical);
  935.  
  936. EXTERN_API( TELErr )
  937. TELDNLookupByIndex                (TELHandle                 hTEL,
  938.                                  short                     dnType,
  939.                                  Boolean                 physical,
  940.                                  short                     index,
  941.                                  TELDNHandle *            hTELDN);
  942.  
  943. EXTERN_API( TELErr )
  944. TELDNLookupByName                (TELHandle                 hTEL,
  945.                                  ConstStr255Param         DN,
  946.                                  TELDNHandle *            hTELDN);
  947.  
  948. EXTERN_API( TELErr )
  949. TELDNSelect                        (TELDNHandle             hTELDN,
  950.                                  Boolean                 select);
  951.  
  952. EXTERN_API( TELErr )
  953. TELDNDispose                    (TELDNHandle             hTELDN);
  954.  
  955. EXTERN_API( TELErr )
  956. TELGetDNInfo                    (TELDNHandle             hTELDN);
  957.  
  958. EXTERN_API( TELErr )
  959. TELGetDNFlags                    (TELDNHandle             hTELDN,
  960.                                  long *                    dnFeatureFlags,
  961.                                  long *                    dnForwardFlags);
  962.  
  963. EXTERN_API( TELErr )
  964. TELDNMsgHand                    (TELDNHandle             hTELDN,
  965.                                  Boolean                 allDNs,
  966.                                  long                     eventMask,
  967.                                  TelephoneDNMsgUPP         msgProc,
  968.                                  long                     globals);
  969.  
  970. EXTERN_API( TELErr )
  971. TELClrDNMsgHand                    (TELDNHandle             hTELDN,
  972.                                  TelephoneDNMsgUPP         msgProc);
  973.  
  974. EXTERN_API( TELErr )
  975. TELDNEventsSupp                    (TELDNHandle             hTELDN,
  976.                                  long *                    eventMask);
  977.  
  978. EXTERN_API( short )
  979. TELCountCAs                        (TELDNHandle             hTELDN,
  980.                                  short                     internalExternal);
  981.  
  982. EXTERN_API( TELErr )
  983. TELCALookup                        (TELDNHandle             hTELDN,
  984.                                  short                     internalExternal,
  985.                                  short                     index,
  986.                                  TELCAHandle *            hTELCA);
  987.  
  988. EXTERN_API( TELErr )
  989. TELCADispose                    (TELCAHandle             hTELCA);
  990.  
  991. EXTERN_API( TELErr )
  992. TELGetCAState                    (TELCAHandle             hTELCA,
  993.                                  short *                state);
  994.  
  995. EXTERN_API( TELErr )
  996. TELGetCAFlags                    (TELCAHandle             hTELCA,
  997.                                  long *                    caFeatureFlags,
  998.                                  long *                    caOtherFeatures);
  999.  
  1000. EXTERN_API( TELErr )
  1001. TELGetCAInfo                    (TELCAHandle             hTELCA);
  1002.  
  1003. EXTERN_API( TELErr )
  1004. TELCAMsgHand                    (TELDNHandle             hTELDN,
  1005.                                  long                     eventMask,
  1006.                                  TelephoneCAMsgUPP         msgProc,
  1007.                                  long                     globals);
  1008.  
  1009. EXTERN_API( TELErr )
  1010. TELClrCAMsgHand                    (TELDNHandle             hTELDN,
  1011.                                  TelephoneCAMsgUPP         msgProc);
  1012.  
  1013. EXTERN_API( TELErr )
  1014. TELCAEventsSupp                    (TELDNHandle             hTELDN,
  1015.                                  long *                    eventMask);
  1016.  
  1017. EXTERN_API( TELErr )
  1018. TELSetupCall                    (TELDNHandle             hTELDN,
  1019.                                  TELCAHandle *            hTELCA,
  1020.                                  ConstStr255Param         destDN,
  1021.                                  ConstStr255Param         destName,
  1022.                                  ConstStr255Param         destSubaddress,
  1023.                                  ConstStr255Param         userUserInfo,
  1024.                                  short                     bearerType,
  1025.                                  short                     rate);
  1026.  
  1027. EXTERN_API( TELErr )
  1028. TELConnect                        (TELCAHandle             hTELCA);
  1029.  
  1030. EXTERN_API( TELErr )
  1031. TELDialDigits                    (TELCAHandle             hTELCA,
  1032.                                  ConstStr255Param         digits);
  1033.  
  1034. EXTERN_API( TELErr )
  1035. TELAcceptCall                    (TELCAHandle             hTELCA);
  1036.  
  1037. EXTERN_API( TELErr )
  1038. TELRejectCall                    (TELCAHandle             hTELCA,
  1039.                                  short                     reason);
  1040.  
  1041. EXTERN_API( TELErr )
  1042. TELDeflectCall                    (TELCAHandle             hTELCA,
  1043.                                  ConstStr255Param         rmtDN,
  1044.                                  ConstStr255Param         rmtName,
  1045.                                  ConstStr255Param         rmtSubaddress);
  1046.  
  1047. EXTERN_API( TELErr )
  1048. TELAnswerCall                    (TELCAHandle             hTELCA);
  1049.  
  1050. EXTERN_API( TELErr )
  1051. TELDrop                            (TELCAHandle             hTELCA,
  1052.                                  ConstStr255Param         userUserInfo);
  1053.  
  1054. EXTERN_API( TELErr )
  1055. TELHold                            (TELCAHandle             hTELCA);
  1056.  
  1057. EXTERN_API( TELErr )
  1058. TELRetrieve                        (TELCAHandle             hTELCA);
  1059.  
  1060. EXTERN_API( TELErr )
  1061. TELConferencePrep                (TELCAHandle             hTELCA1,
  1062.                                  TELCAHandle             hTELCA2,
  1063.                                  short                     numToConference);
  1064.  
  1065. EXTERN_API( TELErr )
  1066. TELConferenceEstablish            (TELCAHandle             hTELCA1,
  1067.                                  TELCAHandle             hTELCA2);
  1068.  
  1069. EXTERN_API( TELErr )
  1070. TELConferenceSplit                (TELCAHandle             hTELCA);
  1071.  
  1072. EXTERN_API( TELErr )
  1073. TELTransferPrep                    (TELCAHandle             hTELCA1,
  1074.                                  TELCAHandle             hTELCA2);
  1075.  
  1076. EXTERN_API( TELErr )
  1077. TELTransferEstablish            (TELCAHandle             hTELCA1,
  1078.                                  TELCAHandle             hTELCA2);
  1079.  
  1080. EXTERN_API( TELErr )
  1081. TELTransferBlind                (TELCAHandle             hTELCA,
  1082.                                  ConstStr255Param         rmtDN,
  1083.                                  ConstStr255Param         rmtName,
  1084.                                  ConstStr255Param         rmtSubaddress);
  1085.  
  1086. EXTERN_API( TELErr )
  1087. TELForwardSet                    (TELDNHandle             hTELDN,
  1088.                                  ConstStr255Param         forwardDN,
  1089.                                  ConstStr255Param         forwardName,
  1090.                                  ConstStr255Param         forwardSubaddress,
  1091.                                  short                     forwardType,
  1092.                                  short                     numrings);
  1093.  
  1094. EXTERN_API( TELErr )
  1095. TELForwardClear                    (TELDNHandle             hTELDN,
  1096.                                  short                     forwardType);
  1097.  
  1098. EXTERN_API( TELErr )
  1099. TELCallbackSet                    (TELCAHandle             hTELCA,
  1100.                                  short *                callbackRef);
  1101.  
  1102. EXTERN_API( TELErr )
  1103. TELCallbackClear                (TELHandle                 hTEL,
  1104.                                  short                     callbackRef);
  1105.  
  1106. EXTERN_API( TELErr )
  1107. TELCallbackNow                    (TELCAHandle             hTELCA,
  1108.                                  short                     callbackRef);
  1109.  
  1110. EXTERN_API( TELErr )
  1111. TELDNDSet                        (TELDNHandle             hTELDN,
  1112.                                  short                     dndType);
  1113.  
  1114. EXTERN_API( TELErr )
  1115. TELDNDClear                        (TELDNHandle             hTELDN,
  1116.                                  short                     dndType);
  1117.  
  1118. EXTERN_API( TELErr )
  1119. TELCallPickup                    (TELCAHandle             hTELCA,
  1120.                                  ConstStr255Param         pickupDN,
  1121.                                  short                     pickupGroupID);
  1122.  
  1123. EXTERN_API( TELErr )
  1124. TELParkCall                        (TELCAHandle             hTELCA,
  1125.                                  StringPtr *            parkRetrieveID,
  1126.                                  ConstStr255Param         parkID);
  1127.  
  1128. EXTERN_API( TELErr )
  1129. TELRetrieveParkedCall            (TELCAHandle             hTELCA,
  1130.                                  ConstStr255Param         parkRetrieveID);
  1131.  
  1132. EXTERN_API( TELErr )
  1133. TELVoiceMailAccess                (TELCAHandle             hTELCA);
  1134.  
  1135. EXTERN_API( TELErr )
  1136. TELPaging                        (TELCAHandle             hTELCA,
  1137.                                  short                     pageID);
  1138.  
  1139. EXTERN_API( TELErr )
  1140. TELIntercom                        (TELCAHandle             hTELCA,
  1141.                                  short                     intercomID);
  1142.  
  1143. EXTERN_API( TELErr )
  1144. TELOtherFeatureList                (TELHandle                 hTEL,
  1145.                                  FeatureListPtr *        fList);
  1146.  
  1147. EXTERN_API( TELErr )
  1148. TELOtherFeatureImplement        (TELHandle                 hTEL,
  1149.                                  Handle                 theHandle,
  1150.                                  short                     featureID);
  1151.  
  1152. EXTERN_API( TELErr )
  1153. TELToolFunctions                (TELHandle                 hTEL,
  1154.                                  short                     msgcode,
  1155.                                  Boolean *                supportsIt);
  1156.  
  1157. EXTERN_API( TELErr )
  1158. TELOtherFunction                (TELHandle                 hTEL,
  1159.                                  Ptr                     paramblock,
  1160.                                  long                     size);
  1161.  
  1162. EXTERN_API( TELErr )
  1163. TELGetHooksw                    (TELHandle                 hTEL,
  1164.                                  short                     hookType,
  1165.                                  Boolean *                offHook);
  1166.  
  1167. EXTERN_API( TELErr )
  1168. TELSetHooksw                    (TELHandle                 hTEL,
  1169.                                  short                     hookType,
  1170.                                  Boolean                 offHook);
  1171.  
  1172. EXTERN_API( TELErr )
  1173. TELGetVolume                    (TELHandle                 hTEL,
  1174.                                  short                     volType,
  1175.                                  short *                level,
  1176.                                  short *                volState);
  1177.  
  1178. EXTERN_API( TELErr )
  1179. TELSetVolume                    (TELHandle                 hTEL,
  1180.                                  short                     volType,
  1181.                                  short *                level,
  1182.                                  short                     volState);
  1183.  
  1184. EXTERN_API( TELErr )
  1185. TELAlert                        (TELHandle                 hTEL,
  1186.                                  short *                level,
  1187.                                  short                     alertPattern);
  1188.  
  1189. EXTERN_API( TELErr )
  1190. TELGetDisplay                    (TELHandle                 hTEL,
  1191.                                  short                     index,
  1192.                                  short *                displayMode,
  1193.                                  StringPtr *            text);
  1194.  
  1195. EXTERN_API( TELErr )
  1196. TELSetDisplay                    (TELHandle                 hTEL,
  1197.                                  short                     index,
  1198.                                  short                     displayMode,
  1199.                                  ConstStr255Param         text);
  1200.  
  1201. EXTERN_API( void )
  1202. TELIdle                            (TELHandle                 hTEL);
  1203.  
  1204. EXTERN_API( void )
  1205. TELActivate                        (TELHandle                 hTEL,
  1206.                                  Boolean                 activate);
  1207.  
  1208. EXTERN_API( void )
  1209. TELResume                        (TELHandle                 hTEL,
  1210.                                  Boolean                 resume);
  1211.  
  1212. EXTERN_API( Boolean )
  1213. TELMenu                            (TELHandle                 hTEL,
  1214.                                  short                     menuID,
  1215.                                  short                     item);
  1216.  
  1217. EXTERN_API( void )
  1218. TELEvent                        (TELHandle                 hTEL,
  1219.                                  const EventRecord *    theEvent);
  1220.  
  1221. EXTERN_API( void )
  1222. TELGetToolName                    (short                     procID,
  1223.                                  Str255                 name);
  1224.  
  1225. EXTERN_API( Handle )
  1226. TELGetVersion                    (TELHandle                 hTEL);
  1227.  
  1228. EXTERN_API( short )
  1229. TELGetTELVersion                (void);
  1230.  
  1231. EXTERN_API( TELErr )
  1232. TELIntlToEnglish                (TELHandle                 hTEL,
  1233.                                  Ptr                     inputPtr,
  1234.                                  Ptr *                    outputPtr,
  1235.                                  short                     language);
  1236.  
  1237. EXTERN_API( TELErr )
  1238. TELEnglishToIntl                (TELHandle                 hTEL,
  1239.                                  Ptr                     inputPtr,
  1240.                                  Ptr *                    outputPtr,
  1241.                                  short                     language);
  1242.  
  1243. EXTERN_API( TELErr )
  1244. TELGetDNSoundInput                (TELDNHandle             hTELDN,
  1245.                                  Str255                 deviceName);
  1246.  
  1247. EXTERN_API( TELErr )
  1248. TELDisposeDNSoundInput            (TELDNHandle             hTELDN,
  1249.                                  ConstStr255Param         deviceName);
  1250.  
  1251. EXTERN_API( TELErr )
  1252. TELGetDNSoundOutput                (TELDNHandle             hTELDN,
  1253.                                  Component *            SndOut);
  1254.  
  1255. EXTERN_API( TELErr )
  1256. TELDisposeDNSoundOutput            (TELDNHandle             hTELDN,
  1257.                                  Component                 SndOut);
  1258.  
  1259. EXTERN_API( TELErr )
  1260. TELGetHSSoundInput                (TELHandle                 termHand,
  1261.                                  Str255                 deviceName);
  1262.  
  1263. EXTERN_API( TELErr )
  1264. TELDisposeHSSoundInput            (TELHandle                 termHand,
  1265.                                  ConstStr255Param         deviceName);
  1266.  
  1267. EXTERN_API( TELErr )
  1268. TELGetHSSoundOutput                (TELHandle                 termHand,
  1269.                                  Component *            SndOut);
  1270.  
  1271. EXTERN_API( TELErr )
  1272. TELDisposeHSSoundOutput            (TELHandle                 termHand,
  1273.                                  Component                 SndOut);
  1274.  
  1275. EXTERN_API( TELErr )
  1276. TELDNSetAutoAnswer                (TELDNHandle             hTELDN,
  1277.                                  Boolean                 AutoAnswerOn);
  1278.  
  1279. EXTERN_API( TELErr )
  1280. TELDNTollSaverControl            (TELDNHandle             hTELDN,
  1281.                                  Boolean                 QuickAnswer);
  1282.  
  1283. EXTERN_API( TELErr )
  1284. TELSetIndHSConnect                (TELHandle                 termHand,
  1285.                                  Boolean                 Connect);
  1286.  
  1287. EXTERN_API( TELErr )
  1288. TELGetIndHSConnect                (TELHandle                 termHand,
  1289.                                  Boolean *                Connect);
  1290.  
  1291. EXTERN_API( TELErr )
  1292. TELCAVoiceDetect                (TELCAHandle             hTELCA,
  1293.                                  Boolean                 VoiceDetectOn);
  1294.  
  1295. EXTERN_API( TELErr )
  1296. TELCASilenceDetect                (TELCAHandle             hTELCA,
  1297.                                  Boolean                 DetectOn,
  1298.                                  long                     Period);
  1299.  
  1300. EXTERN_API( TELErr )
  1301. TELGetTelNewErr                    (void);
  1302.  
  1303. EXTERN_API( TELErr )
  1304. TELDNSetDTMF                    (TELDNHandle             hTELDN,
  1305.                                  Boolean                 dtmfOn);
  1306.  
  1307. EXTERN_API( TELErr )
  1308. TELDNGetDTMF                    (TELDNHandle             hTELDN,
  1309.                                  Boolean *                dtmfOn);
  1310.  
  1311. EXTERN_API( TELErr )
  1312. TELHSSetDTMF                    (TELHandle                 termHand,
  1313.                                  Boolean                 dtmfOn);
  1314.  
  1315. EXTERN_API( TELErr )
  1316. TELHSGetDTMF                    (TELHandle                 termHand,
  1317.                                  Boolean *                dtmfOn);
  1318.  
  1319. EXTERN_API( TELErr )
  1320. TELGetDNStatus                    (TELDNHandle             hTELDN,
  1321.                                  long *                    inUse);
  1322.  
  1323. EXTERN_API( TELErr )
  1324. TELGetDNProgressDet                (TELDNHandle             hTELDN,
  1325.                                  long                     selector,
  1326.                                  Boolean *                prgDetOn);
  1327.  
  1328. EXTERN_API( TELErr )
  1329. TELSetDNProgressDet                (TELDNHandle             hTELDN,
  1330.                                  long                     selector,
  1331.                                  Boolean                 prgDetOn);
  1332.  
  1333.  
  1334.  
  1335. #if PRAGMA_STRUCT_ALIGN
  1336.     #pragma options align=reset
  1337. #elif PRAGMA_STRUCT_PACKPUSH
  1338.     #pragma pack(pop)
  1339. #elif PRAGMA_STRUCT_PACK
  1340.     #pragma pack()
  1341. #endif
  1342.  
  1343. #ifdef PRAGMA_IMPORT_OFF
  1344. #pragma import off
  1345. #elif PRAGMA_IMPORT
  1346. #pragma import reset
  1347. #endif
  1348.  
  1349. #ifdef __cplusplus
  1350. }
  1351. #endif
  1352.  
  1353. #endif /* __TELEPHONES__ */
  1354.  
  1355.